import request from '@/utils/request'


export default {
    //班级列表 条件查询带分页
    getListPage(page,size,grade){
        return request({
            url: `/cmsservice/classes/pageClasses/${page}/${size}`,
            method: 'post', 
            params: {
                grade
            }
          })
    },
    //根据id删除班级
    removeById(id) {
        return request({
        url: `/cmsservice/classes/removeClasses/${id}`,
        method: 'post'
         })
    },
    //添加班级
    addInfo(data){
        return request({
            url: `/cmsservice/classes/addClasses`,
            method: 'post',
            data
        })
    },
    //修改班级
    updateInfo(data){
        return request({
            url: `/cmsservice/classes/updateClasses`,
            method: 'post',
            data          
        }) 
    },
    //id查询数据回显
    getInfoById(id){
        return request({
            url: `/cmsservice/classes/getClass/${id}`,
            method: 'get'          
        })
    },

    // 联级选择器班级
    getCascaderClass() {
        return request({
            url: `/cmsservice/classes/cascaderClass`,
            method: 'get'          
        })
    }
}

